import React from "react";
import {Button, Icon} from "antd";
import PropTypes from "prop-types";


const BottomBtn = ({text, type, icon, onBtnClick}) => {

    return (
        <Button
            type={type}
            onClick={onBtnClick}
        >
            <Icon type={icon}/> {text}
        </Button>
    )

};

// 属性检查
BottomBtn.prototype = {
    text: PropTypes.string,
    colorClass: PropTypes.string,
    icon: PropTypes.element.isRequired,
    onBtnClick: PropTypes.func
};

BottomBtn.defaultProps = {
    type: 'primary',
    text: '新建'
};

export default BottomBtn;
